//
//  LearnerLogger.m
//  Do Not Disturb
//
//  Created by Chris Karr on 9/15/07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import "LearnerLogger.h"

@implementation LearnerLogger

- (void) setLearner:(Learner *) l
{
	learner = l;
}

- (Learner *) getLearner
{
	return learner;
}

- (void) logLabel:(NSString *) label readings:(NSArray *) readings
{
	if (learner == nil)
		[super logLabel:label readings:readings];
	else
		[learner addExample:readings forClass:label];
}

- (NSNumber *) readingCount
{
	if (learner != nil)
		return [learner exampleCount];
	else
		return [super readingCount];
}

- (void) clear
{
	[learner reset];
}

@end
